#!/bin/bash

# useCollectionTask - 明确使用query对象
sed -i '161s/refetchInterval: (data) => {/refetchInterval: (query) => {/' useCollectionTask.ts
sed -i '163s/if (data && (data.status/if (query.state.data \&\& (query.state.data.status/' useCollectionTask.ts

# useExportTask - 明确使用query对象
sed -i '133s/refetchInterval: (data) => {/refetchInterval: (query) => {/' useExportTask.ts
sed -i '135s/if (data && (data.status/if (query.state.data \&\& (query.state.data.status/' useExportTask.ts

echo "refetchInterval updated to use query object parameter"
